package com.xiaoxin.experience.common;

import com.xiaoxin.experience.util.JSONUtil;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author xiaoxin
 */
@Setter
@Getter
public class BaseResponse implements Serializable {

    private static final long serialVersionUID = -6667870297611093068L;

    private int resultCode;

    private String resultDesc;

    public BaseResponse()
    {
        this.resultCode = 0;
        this.resultDesc = "SUCCESS";
    }

    public static BaseResponse success()
    {
        return new BaseResponse();
    }

    @Override
    public String toString() {
        return JSONUtil.toJson(this);
    }
}
